<div class="container">
    <div class="top">
        <h1 class="page__title" style="background-color:#479de6">維修紀錄
            <span id="PageBack" class="back">返回</span>
        </h1>
    </div>
    <div class="page" id="page" style="background-color:#ffffff;">
        <div class="pagebg"></div>
        <div class="pagemain">
            <div id="view215411" class="" style="padding: 5px; margin: 5px;">
                {if !$isanchanguser}
                <a href="{:url('home/anchanglist')}">
                    返回
                </a>
                <div class="">
                    <p style="text-align: center;"><span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; font-size: 24px;"><strong>新增維修紀錄</strong></span></p>
                </div>
                <div class="" style="padding-top: 5px; padding-left: 5px; padding-right: 5px; margin-top: 5px; margin-left: 5px;">
                    <strong><span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; font-size: 16px;">&nbsp; &nbsp; 案場</span></strong>
                </div>
                <div class="" style="padding: 0px 5px; margin: 0px 5px 5px;">
                    &nbsp; &nbsp; &nbsp;
                    <span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; font-size: 16px;"> &nbsp;&nbsp;<span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; color: rgb(51, 51, 51); text-align: center; background-color: rgb(245, 245, 245);">{$anchang.name}</span></span>
                </div>
                {else}
                    <div class="" style="padding-top: 5px; padding-left: 5px; padding-right: 5px; margin-top: 5px; margin-left: 5px;">
                        <strong><span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; font-size: 16px;">&nbsp; &nbsp; 案場</span></strong>
                    </div>
                    <div class="" style="padding: 0px 5px; margin: 0px 5px 5px;">
                        &nbsp; &nbsp; &nbsp;
                        <span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; font-size: 16px;"> &nbsp;&nbsp;<span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; color: rgb(51, 51, 51); text-align: center; background-color: rgb(245, 245, 245);">{$anchang.name}</span></span>
                    </div>

                    <div class="weui-panel weui-panel_access">
                        <div class="weui-panel__hd nav-black">
                            <div class="weui-panel__title">
                                歷史維修紀錄
                            </div>
                            <div class="weui-panel__tools">
                                <a data-index="711821" href="actions" page="actions"> 更多 </a>
                                <div class="actions711821 hide" data-position="Up" data-effect="bounce">
                                    <div class="weui-actionsheet__menu">
                                        <div class="weui-grids ">
                                            <div class="weui-media-box weui-media-box_text direction-column  weui-grid-33" style="">
                                                <a page="empty" href="{:url('home/addmaintenance').'?anchang_id='.$anchangid.'&mode=0'}"> <h4 class="weui-media-box__title" style="">最近一個月</h4> </a>
                                            </div>
                                            <div class="weui-media-box weui-media-box_text direction-column  weui-grid-33" style="">
                                                <a page="empty" href="{:url('home/addmaintenance').'?anchang_id='.$anchangid.'&mode=1'}"> <h4 class="weui-media-box__title" style="">最近三個月</h4> </a>
                                            </div>
                                            <div class="weui-media-box weui-media-box_text direction-column  weui-grid-33" style="">
                                                <a page="empty" href="{:url('home/addmaintenance').'?anchang_id='.$anchangid.'&mode=2'}"> <h4 class="weui-media-box__title" style="">最近六個月</h4> </a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                {/if}


                <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                    {if $isanchanguser}

                       <input type="hidden" name="row[anchang_id]" value="{$anchangid}">
                       <input type="hidden" name="row[maintenance_id]" value="{$maintenanceid}">
                       <input type="hidden" name="row[task_id]" value="{$taskid}">

                        <div class="weui-cell">
                            <div class="weui-cell__bd">
                                <div class="weui-textarea ">{$content0}</div>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__bd">
                                <textarea rows="3" placeholder="請輸入留言內容" name="row[content]" id="983628" class="weui-textarea "></textarea>
                            </div>
                        </div>

                        <div class="weui-cells__title  ">
                            &nbsp;&nbsp;
                        </div>
                        <div class="weui-form">
                            <div class="weui-form-item">
                                <button type="submit" class="weui-btn   weui-btn_primary  ">提交</button>
                            </div>
                        </div>

                    {else}
                        <div class="weui-cell">
                            <div class="weui-cell__bd">
                                <textarea rows="3" placeholder="請輸入維修紀錄" name="row[content]"  class="weui-textarea ">{$content1}</textarea>
                            </div>
                        </div>
                        <div class="weui-cells__title  ">
                            上傳圖片
                        </div>
                        <div class="col-xs-12 col-sm-8">
                            <div class="input-group">
                                <input id="c-images" class="form-control" size="500" name="row[images]" type="text" value="">
                                <div class="input-group-addon no-border no-padding">
                                    <span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                </div>
                                <span class="msg-box n-right" for="c-images"></span>
                            </div>
                            <ul class="row list-inline plupload-preview" id="p-images"></ul>
                        </div>
                        <div class="weui-cells__title  ">
                            &nbsp;&nbsp;
                        </div>
                        <div class="weui-form">
                            <div class="weui-form-item">
                                <button type="submit" class="weui-btn   weui-btn_primary  ">保存</button>
                            </div>
                        </div>
                    {/if}
                    <input type="hidden" name="row[url]" value="{$url}">

                </form>

                <form class="form-horizontal" id="form2" role="form2" data-toggle="validator" method="post" action="">
                    {if !$isanchanguser}
                    <input type="hidden" name="anchang_id" value="{$anchang.id}">
                    <div class="">
                        &nbsp; &nbsp;&nbsp;
                        <span style="font-family: 微软雅黑, &quot;Microsoft YaHei&quot;; font-size: 18px;">維修歷史</span>
                    </div>

                    <div class="weui-flex" style="text-align: center; vertical-align: middle;">
                        <div id="flex_item6340830" class="weui-flex_item weui-flex_item6340830" style="flex-basis:auto;padding: 0px !important;width:100%;">
                            <div class="weui-cell">
                                <div class="weui-cell__bd">
                                    <input id="keywords" type="text" placeholder="請輸入關鍵字" value="{$keywords}" name="keywords"  class="weui-input  " />
                                </div>
                            </div>
                        </div>
                        <div id="flex_item6340831" class="weui-flex_item weui-flex_item6340831" style="flex-basis:auto;padding: 0px !important;width:100%;">
                            <div class="weui-form" style="text-align: center; vertical-align: middle; padding-top: 10px; padding-bottom: 0px;">
                                <div class="weui-form-item">
                                    <button type="submit"  class="weui-btn weui-btn_mini   weui-btn_primary  ">查詢</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    {/if}
                    <div id="contentHtml">
                        {$content0}
                    </div>

                </form>

            </div>
            <div class="">
            </div>
            <div class="weui-tabbar .tabbar167659" id="tabbar167659" style="width: 100%;">
                <a href="{:url('home/index')}" page="index" class="weui-tabbar__item   "> <img src="__CDN__/assets/images/icon1c.png" img="__CDN__/assets/images/icon1.png" selectimg="__CDN__/assets/images/icon1c.png" alt="" class="weui-tabbar__icon" style="" /> <p class="weui-tabbar__label weui-tabbar__label413181">首頁</p> </a>
                <a href="{:url('home/cbzy')}" page="cbzy" class="weui-tabbar__item "> <img src="__CDN__/assets/images/icon2c.png" img="__CDN__/assets/images/icon2c.png" selectimg="__CDN__/assets/images/icon2.png" alt="" class="weui-tabbar__icon" style="" /> <p class="weui-tabbar__label weui-tabbar__label413181">抄表作業</p> </a>

                {if !$isanchanguser}
                <a href="{:url('home/anchanglist')}" page="anchanglist" class="weui-tabbar__item  weui-bar__item_on "> <img src="__CDN__/assets/images/icon_purchase04_pressed.png" img="__CDN__/assets/images/icon_purchase04_pressed.png" selectimg="__CDN__/assets/images/icon_purchase04.png" alt="" class="weui-tabbar__icon" style="" /> <p class="weui-tabbar__label weui-tabbar__label970785">案場</p> </a>
                {else}
                <a href="{:url('home/anchang').'?anchang_id='.$anchang.id}" page="anchang" class="weui-tabbar__item  weui-bar__item_on"> <img src="__CDN__/assets/images/icon_purchase04_pressed.png" img="__CDN__/assets/images/icon_purchase04_pressed.png" selectimg="__CDN__/assets/images/icon_purchase04.png" alt="" class="weui-tabbar__icon" style="" /> <p class="weui-tabbar__label weui-tabbar__label281124">案場</p> </a>
                {/if}

                <a href="{:url('user/profile')}" page="account" class="weui-tabbar__item  "> <img src="__CDN__/assets/images/icon3c.png" img="__CDN__/assets/images/icon3c.png" selectimg="__CDN__/assets/images/icon3.png" alt="" class="weui-tabbar__icon" style="" /> <p class="weui-tabbar__label weui-tabbar__label413181">帳號</p> </a>
                <style type="text/css">
                    .tabbar167659 {}

                    .weui-tabbar__label167659 {
                        color: #999999 !important;
                    "

                    }

                    .weui-tabbar__item.weui-bar__item_on .weui-tabbar__label167659 {
                        color: #09bb07 !important;
                    }
                </style>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="__CDN__/static/lib/highlight.js?v=1.0.0"></script>
<script type="text/javascript">
    /* 保存初始测试文本内容 */
    var oldStr= $("#contentHtml").html();
    var keywords = $("#keywords").val();
    /* 对象级别插件调用 将选择器元素的 html 值设置为高亮 */
    if (keywords != "") {
        $("#contentHtml").highlight({
            color:'#ff00ff',// 高度颜色，默认:#f00
            weight:true,    // 是否加粗，默认:不加粗
            keys: keywords       //需要高亮的值，必须的
        });
    }

</script>